package jatosoft.accounting.service.impl;

import jatosoft.accounting.dao.AccountDao;
import jatosoft.accounting.dao.model.Account;
import jatosoft.accounting.service.AccountService;

import java.util.List;

public class AccountServiceImpl extends BaseServiceImpl implements AccountService {

	private AccountDao accountDao;

	public void setAccountDao(AccountDao accountDao) {
		this.accountDao = accountDao;
	}

	public List<Account> listAccount(String parentId) {

		return accountDao.queryAccount(parentId);
	}

	public void addAccount(Account account) {
		accountDao.saveAccount(account);
	}

	public void removeAccount(Account account) {
		accountDao.delAccount(account);
	}

	public List<Account> listMajorAccount() {
		return accountDao.queryMajorAccount();
	}

}
